package com.hsd.znsh.repository;

import com.hsd.znsh.entity.Host;
import com.hsd.znsh.entity.Monitor;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/*
 * @auther: wangjiacai
 *
 * @create: 2018-04-23 11:54:50
 */
public interface MonitorRepository extends JpaRepository<Monitor,Integer> {

    List<Monitor> findByIdIn(List<Integer> ids);

    List<Monitor> findByCreateUserId(Integer createUserId);

    Monitor findByProbeName(String probeName);

    Monitor findByMonitorSn(String monitorSn);

    List<Monitor> findByMonitorType(Integer monitorType);

    List<Monitor> findByMonitorTypeAndIdIn(Integer monitorType,List<Integer> ids);

    List<Monitor> findByHostId(Integer hostId);

    long countByHostId(Integer hostId);
}

